matplotlib_nullptr_s390x
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Thu, 5 Feb 2026 19:55:34 +0000 (20:55 +0100)
committerDrew Parsons <dparsons@debian.org>
Thu, 5 Feb 2026 19:55:34 +0000 (20:55 +0100)
===================================================================

Gbp-Pq: Name matplotlib_nullptr_s390x.patch

Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx

index d8261ac29e432f55d8629d4b13808269f546173d..dcff6556f943a818c79eff9defc03f0cbaa596b8 100644 (file)
@@ -1029,6 +1029,12 @@ bool vtkMatplotlibMathTextUtilities::RenderOneCell(vtkImageData* image, int bbox
     {
       unsigned char* ptr = static_cast<unsigned char*>(image->GetScalarPointer(col, row, 0));
 
+      if (ptr == nullptr)
+      {
+       vtkErrorMacro("image returned null ScalarPointer.");
+       return false;
+      }
+
       // Background, do not load python data
       if (row > pythonRowStart || col < pythonColStart || row <= pythonRowEnd ||
         col >= pythonColEnd)